package com.youle.common.util;

import org.springframework.stereotype.Component;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by Administrator on 2017/11/20.
 */
@Component
public class ThreadPool {

    private static ExecutorService executorService;

    static {
        executorService = Executors.newCachedThreadPool();
    }

    public void execute(Runnable runnable) {
        executorService.execute(runnable);
    }
}
